import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2022-05-05
 * Time: 17:59
 */
public class Main {
    public static void main(String[] args) {
        int numbers = 0;
        int words = 0;
        int space = 0;
        int other = 0;
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();

        int index = str.length();
        while(index > 0) {
            char ch = str.charAt(index-1);
            if(ch >= 'a' && ch <='z' || ch >='A'&&ch <='Z') {
                words++;
            } else if(ch >= '0' && ch <='9') {
                numbers++;
            } else if(ch ==' '){
                space++;
            } else {
                other++;
            }
            index--;
        }


        System.out.println("英文字母"+words+"数字"+numbers+"空格"+space+"其他"+other);
    }
    public static void main8(String[] args) {
        ArrayDeque deque = new ArrayDeque();

        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String name = scanner.next();
            // 初始化队列中的数据
            deque.offerLast(name);
        }


        System.out.println(deque.getFirst());
        System.out.println(deque.getLast());
        System.out.println(deque.getFirst());
        System.out.println(deque.getLast());
        System.out.println(deque.getLast());





    }
    public static void main7(String[] args) {
        Guest guest1 = new Guest("小明",false);
        Guest guest2 = new Guest("小军",false);
        Guest vipGuest = new Guest("小红",true);
        Deque<Guest> deque = new ArrayDeque<>();
        deque.add(guest1);
        deque.add(guest2);
        deque.addFirst(vipGuest);




        System.out.println(deque);
    }
}
class Guest{
    String name;
    Boolean vip;

    @Override
    public String toString() {
        return name;
    }

    public Guest(String name, Boolean vip) {
        this.name = name;
        this.vip = vip;

    }
    public static void main6(String[] args) {
        Scanner scanner = new Scanner(System.in);
        List<Integer> list = new ArrayList<>();
        int num1 = scanner.nextInt();
        int num2 = scanner.nextInt();
        int num3 = scanner.nextInt();
        int num4 = scanner.nextInt();
        int num5 = scanner.nextInt();
        scanner.close();
        list.add(num1);
        list.add(num2);
        list.add(num3);
        list.add(num4);
        list.add(num5);
        System.out.print("普通for循环:");

        for(int i = 0 ;i < list.size();i++) {
            System.out.print(list.get(i)+" ");
        }


        System.out.println();
        System.out.print("增强for循环:");

        for(int a:list) {
            System.out.print(a+" ");
        }


        System.out.println();
        System.out.print("迭代器遍历:");

        Iterator it = list.iterator();
        while(it.hasNext()) {
            System.out.print(it.next()+" ");
        }


        System.out.println();
    }
    public static void main4(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        scanner.close();
        HashSet<Character> hs = new HashSet<>();
        for(int i = 0; i < str.length();i++) {
            hs.add(str.charAt(i));
        }


        for (char c:hs) {
            System.out.print(c);
        }
    }
    public static void main3(String[] args) throws ScoreException {
        Scanner scanner = new Scanner(System.in);
        int score = scanner.nextInt();
        try {
            if (!(score >= 0 && score <= 100)) {
                throw new ScoreException("分数不合法");
            } else {
                System.out.println(score);
            }
        } catch (ScoreException e) {
            System.out.println(e.getMessage());
        }

    }
}

class ScoreException extends Exception {

    public ScoreException() {
        super();
    }

    public ScoreException(String name) {
        super(name);
    }
    public static void main2(String[] args) {
        Scanner console = new Scanner(System.in);
        int year = console.nextInt();

        Calendar calendar = Calendar.getInstance();
        for (int month = 1; month <= 12; month++) {
            calendar.set(year, month, 0);
            System.out.println(year+"年"+month+"月:"+
                    calendar.get(calendar.DAY_OF_MONTH)+"天");
        }
    }

    public static void main1(String[] args) {
        Scanner scan = new Scanner(System.in);
        int input = scan.nextInt();
        System.out.println((double) Math.abs(input));
        System.out.println(Math.sqrt(input));
        System.out.println(Math.log(input));
        System.out.println(Math.sin(input));

    }
}